﻿@{
    Layout = null;
    var StartDate = ViewBag.StartDate;
    //var StartDate = @DateTimeHelper.FormatDate(DateTime.Now.Date.AddDays(-10), "yyyy-MM-dd");
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
    <title>西安市班线客运安全管理系统</title>
    <link href="~/www/css/style.css" rel="stylesheet" />
    <script src="~/www/js/layer_mobile/layer.js"></script>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <link href="~/www/js/skin/WdatePicker.css" rel="stylesheet" />
</head>
<body>
    <a class="homeLinks" href="@Url.Action("home","M_login")">返回主页</a>
    <div class="djcCenHea"><span></span>已稽查车辆</div>
    <div class="djcCen">
        <div class="djcCenFor">
            <form id="form1">
                <input type="text" id="CarNO" name="CarNO" placeholder="请输入最少4位车牌号" class="djcCFTxt" />
                <input id="startDate" name="startDate" class="Wdate" value="@StartDate" onFocus="WdatePicker({lang:'zh-cn'})" />
                <button class="djcCFBut" type="submit" onclick="return SubmitData1()">
                    <i class="fa fa-search"></i> 搜索
                </button>
            </form>
        </div>
        <div id="SystemReg" class="djcCenTab" data-url="@Url.Action("Grid","M_SystemReg")">
            @Html.Action("Grid", "M_SystemReg")
        </div>
    </div>
</body>
</html>
@Html.LocalImport("~/www/js/WdatePicker.js")
@Html.CdnImport("~/lib/jquery/jquery.js")
<script>
    function SubmitData1()
    {
        var BusCode = $("#CarNO").val();//车牌号
        var starDate = $("#startDate").val();//查询时间
        if (BusCode == null || BusCode.length < 4) {
            layer.open({ content: "请输入最少4位车牌号！", btn: "确定" });
            return false;
        } if (starDate == null) {
            layer.open({ content: "请输入查询日期！", btn: "确定" });
            return false;
        }
        //$.ajax({
        //    type: "POST",
        //    url: "/M_SystemReg/Grid",
        //    data: {
        //        CarNO: BusCode, startDate: starDate
        //    },
        //    datatype: "json",
        //    success: function (result) {
        //        if (result.success) {
        //            layer.open({ content: "成功！", btn: "确定" });
        //            return true;
        //        }
        //        else {
        //            layer.open({ content: "失败！", btn: "确定" });
        //            return false;
        //        }
        //    }
        //});
    };
</script>